<title>Trang Chủ - Homepage - Origami Shop Online | Origamishop.net</title>
<?php
			echo'
<div id="mainid">
	<div class="ld10"></div>
    <div class="mdm">
	<div class="divspla"></div>
	';
		$strSQL = "SELECT * FROM sp Inner Join ld ON ld.ld_nick = sp.sp_ld ORDER BY sp.sp_id DESC LIMIT 10";
        $result = DataProvider::ExecuteQuery($strSQL);
        while($sp = mysql_fetch_array($result))
        {
			echo'
        <div class="md100">
            <div class="mimg70">
            <div class="mhimg"></div>
            <div class="mw100">
            <img class="new" src="'.$div["md_sty"].'new.gif" border="0" quality="10"/>
            </div>
            </div>
            <div class="mcolsl"></div>
            <div class="mndung">
            	<div class="mimges"><a href="'.$host["l_link"].'home.php?typ=product&act=detail&sp_id='.$sp["sp_id"].'"><img src="'.$sp["sp_t1"].'" width="96px" height="100px" border="0" quality="50"/></a></div>
            <div class="mcolsl"></div>
				<div class="m4px"></div>
                <div class="mmdetail">
					<div class="mhtop"></div>
					<div class="mmdiv100"><strong>Tên Sản Phẩm:</strong> <a href="'.$host["l_link"].'home.php?typ=product&act=detail&sp_id='.$sp["sp_id"].'">'.$sp["sp_ten"].'</a> ('.$sp["sp_tenjp"].')</div>
					<div class="mmdiv50"><strong>Giá sản phẩm:</strong> '.$sp["sp_gia"].'đ</div>
					<div class="mmdiv50"><strong>Giảm Giá:</strong> '.$sp["sp_sall"].'đ</div>
					<div class="mmdiv50"><strong>Thời Gian Xếp:</strong> '.$sp["sp_time"].'</div>
					<div class="mmdiv50"><strong>Người Xếp:</strong> <a href="'.$host["l_link"].'home.php?typ=product&act=viewld&ld_id='.$sp["ld_id"].'">'.$sp["ld_ten"].'</a></div>
					<div class="mmdiv100"><strong>Kích Thước Mẫu:</strong> '.$sp["sp_size"].'</div>
					<div class="mmdiv50"><strong>Lượng Tồn:</strong> '.$sp["sp_ton"].'</div>
					<div class="mmdiv50"><strong>Lượt Bán:</strong> '.$sp["sp_count"].'</div>
					<div class="mmdiv50"><strong>Lượt Xem:</strong> '.$sp["sp_see"].'</div>
				</div>
            </div>
            <div class="mcolsl"></div>
			<div class="madd">
				<div class="maddtop"></div>
				<div class="maddm">
			';
		if($_SESSION["IsLogin"] == true)
		   {
			echo '<a href="home.php?typ=product&act=addcart&sp_id='.$sp["sp_id"].'" title="Thêm Vào Giỏ Hàng">';
		   }
		   else 
			{
			echo '<a href="home.php?typ=user&act=login">';
			}
			echo '
				<img class="add" src="'.$div["md_sty"].'cartadd.png" border="0" quality="100"/></a>
				</div>
			</div>
        </div>
		<div class="divspla"></div>
		<div class="divspdi"></div>
		<div class="divspla"></div>
			';
		}
		$strSQL = "SELECT * FROM sp Inner Join ld ON ld.ld_nick = sp.sp_ld ORDER BY sp.sp_count DESC LIMIT 10";
        $result = DataProvider::ExecuteQuery($strSQL);
        while($sp = mysql_fetch_array($result))
        {
			echo'
        <div class="md100">
            <div class="mimg70">
            <div class="mhimg"></div>
            <div class="mw100">
            <img class="new" src="'.$div["md_sty"].'bestbuy.png" border="0" quality="100"/>
            </div>
            </div>
            <div class="mcolsl"></div>
            <div class="mndung">
            	<div class="mimges"><a href="'.$host["l_link"].'home.php?typ=product&act=detail&sp_id='.$sp["sp_id"].'"><img src="'.$sp["sp_t1"].'" width="96px" height="100px" border="0" quality="50"/></a></div>
            <div class="mcolsl"></div>
				<div class="m4px"></div>
                <div class="mmdetail">
					<div class="mhtop"></div>
					<div class="mmdiv100"><strong>Tên Sản Phẩm:</strong> <a href="'.$host["l_link"].'home.php?typ=product&act=detail&sp_id='.$sp["sp_id"].'">'.$sp["sp_ten"].'</a> ('.$sp["sp_tenjp"].')</div>
					<div class="mmdiv50"><strong>Giá sản phẩm:</strong> '.$sp["sp_gia"].'đ</div>
					<div class="mmdiv50"><strong>Giảm Giá:</strong> '.$sp["sp_sall"].'đ</div>
					<div class="mmdiv50"><strong>Thời Gian Xếp:</strong> '.$sp["sp_time"].'</div>
					<div class="mmdiv50"><strong>Người Xếp:</strong> <a href="'.$host["l_link"].'home.php?typ=product&act=viewld&ld_id='.$sp["ld_id"].'">'.$sp["ld_ten"].'</a></div>
					<div class="mmdiv100"><strong>Kích Thước Mẫu:</strong> '.$sp["sp_size"].'</div>
					<div class="mmdiv50"><strong>Lượng Tồn:</strong> '.$sp["sp_ton"].'</div>
					<div class="mmdiv50"><strong>Lượt Bán:</strong> '.$sp["sp_count"].'</div>
					<div class="mmdiv50"><strong>Lượt Xem:</strong> '.$sp["sp_see"].'</div>
				</div>
            </div>
            <div class="mcolsl"></div>
			<div class="madd">
				<div class="maddtop"></div>
				<div class="maddm">
			';
		if($_SESSION["IsLogin"] == true)
		   {
			echo '<a href="home.php?typ=product&act=addcart&sp_id='.$sp["sp_id"].'" title="Thêm Vào Giỏ Hàng">';
		   }
		   else 
			{
			echo '<a href="home.php?typ=user&act=login">';
			}
			echo '
				<img class="add" src="'.$div["md_sty"].'cartadd.png" border="0" quality="100"/></a>
				</div>
			</div>
        </div>
		<div class="divspla"></div>
		<div class="divspdi"></div>
		<div class="divspla"></div>
		';
		}
		echo '
    </div>
	<div class="ld10"></div>
</div>
';
?>
